﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using YouHP.Model;

namespace YouHP.IDAL
{
    public interface IGroupNews
    {
        #region basic operations
        bool AddGroupNews(GroupNewsInfo info);
        bool UpdateGroupNews(GroupNewsInfo info);
        bool DeleteGroupNews(int[] ids);
        GroupNewsInfo GetGroupNewsInfo(int id);
        #endregion

        #region list and search operations
        List<GroupNewsInfo> GetGroupNewsList(int pageSize, int pageIndex, out int count);
        /*search for management*/
        List<GroupNewsInfo> GetGroupNewsByName(int pageSize, int pageIndex, string keyword, out int count);
        List<GroupNewsInfo> GetGroupNewsByGroupId(int pageSize, int pageIndex, int groupId, out int count);

        // 取得某个圈子最新的n条新闻
        List<GroupNewsInfo> GetLattestNews(int groupId, int n);
        #endregion
    }
}